<?php

class Admin_Form_Newtallyservice extends Zend_Form {

    public function init() {
        parent::init();
        $this->initFields();
    }

    public function initFields() {
        $elements = array();

        $service = new Zend_Form_Element_Text("service");
        $service->setRequired(true);
        $elements[] = $service;

        $unit_price = new Zend_Form_Element_Text("unit_price");
        $unit_price->setRequired(true);
        $unit_price->addValidator(new Zend_Validate_Float());
        $elements[] = $unit_price;
        $this->addElements($elements);
    }
    
    protected function createRequiredField($name) {
        $element = new Zend_Form_Element_Text($name);
        $element->setRequired();
        return $element;
    }

}

?>
